﻿namespace Kodefu.Tests
{
    using System;
    using System.Text;
    using System.Collections.Generic;
    using System.Linq;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    [TestClass]
    public class StringGraphTests
    {
        [TestMethod]
        public void StringCombineShouldMakeGingerGermanGingerman()
        {
            Assert.AreEqual("gingerman", "ginger".Combine("german"));
        }

        [TestMethod]
        public void ShouldCompressListOfWordsToShortestStringThatContainsAllWords()
        {
            var terms = new[] { "testing", "ginger", "german", "minutes" };
            StringGraph graph = new StringGraph(terms);
            Assert.AreEqual("minutestingingerman", graph.Compress());
        }
    }
}
